Patent Literature 1 discloses an electric compressor in which a compressor and an electric motor are integrated with each other. The electric compressor includes a housing including a middle casing that accommodates the compressor, a rear casing that accommodates the electric motor, and a front casing that accommodates a drive circuit. Then, the drive circuit and the electric motor are electrically connected to each other by a signal line via a hermetically sealed terminal fixed to the housing.